﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Component;

public partial class FrontEnd_Body_Center_Cart : System.Web.UI.UserControl
{
    public int _Dem = 0;
    public string _DetailCart = ConstString._Default + ConstString._Contact;
    protected void Page_Load(object sender, EventArgs e)
    {
        int idProduct = ConvertType.ToInt(QueryHelper.GetQueryString(Request, ConstString._idPro));
        //if (idProduct <= 0)
        //{
        //    if (idProduct == -1)
        //    {
        //        Sessions.LanguageVN = false;
        //        Response.Redirect(Request.Url.ToString().Replace("-1", "0").Replace("Cart", "Default"));

        //    }
        //    else
        //        if (idProduct == -2)
        //        {
        //            Sessions.LanguageVN = true;
        //            Response.Redirect(Request.Url.ToString().Replace("-2", "0").Replace("Cart", "Default"));
        //        }
        //}
        if (idProduct > 0)
        {
            string alIdProduct = "";
            if (Sessions.IdProducts != "")
            {
                alIdProduct = Sessions.IdProducts;
                alIdProduct += idProduct.ToString()+";";
                Sessions.IdProducts = alIdProduct;
            }
            else
            {
                Sessions.IdProducts = ConvertType.ToString(idProduct)+";";
            }
        }
        _Dem = Sessions.IdProducts.Replace(";","").Length;
    }
}
